package edu.ynu.se.xiecheng.achitectureclass.common.entity;

import edu.ynu.se.xiecheng.achitectureclass.common.entity.abstrac.LogicEntity;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;
import java.util.Date;

@Getter
@Setter
@Entity
@Table(name = "camera_snapshot")
public class CameraSnapshot extends LogicEntity {

    // 摄像头设备的外键
    @Column
    private Long deviceId;

    // 抓拍图片的网址
    @Column( length = 255)
    private String photoPath;

    // 抓拍时间
    @Column
    private Date captureTime;

    // 构造函数
    public CameraSnapshot() {}

    public CameraSnapshot(Long deviceId, String photoPath, Date captureTime) {
        this.deviceId = deviceId;
        this.photoPath = photoPath;
        this.captureTime = captureTime;
    }
}
